<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<style type="text/css">
			.div{
				width:200px;
				height:200px;
				background-color: skyblue;
				transition: all .5s ease-in-out;
			}
			.red{
				background-color: red;
			}
		</style>
		
		
		<div class="div">
			
		</div>
		
		<div class="div melon srll">
			
		</div>
		
		
		
		<script type="text/javascript">
			var div = document.querySelector(".div:nth-of-type(2)");
			
			
			div.addEventListener("mouseover",function(){
				console.log(div.classList);
				div.classList.add("red");
			})
			div.addEventListener("mouseout",function(){
				div.classList.remove("red");
			})
			
		</script>
		
		
	</body>
</html>
